package com.wow.wa.util;

import com.wow.wa.bean.DateBean;

public class DateUtils {
	public static int EQUAL = 0;
	public static int BIG = 1;
	public static int LESS = 2;
	/**
	 * 比較
	 * @param source
	 * @param targer
	 * @param day
	 * @return
	 */
	public static int compareTO(DateBean source, DateBean targer,int day) {
		Integer pSource=source.getIYearMonDay();
		Integer pTatget=targer.getIYearMonDay();
		if(pSource+day==pTatget){
			return EQUAL;
		}else if(pSource+day<pTatget){
			return LESS;
		}else if(pSource+day>pTatget){
			return BIG;
		}
		return -1;
	}
}
